<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
    
    
</head>
<body>
    <div id="app">
        <parent></parent>
  </div>
  <script>
 var Child=Vue.extend({
     template:'<div>我是一个子组件</div>'
 });
 var Parent=Vue.extend({
     template:'<div>我是父组件<child></child></div>',
     components:{
         'child':Child
     }
 })

    Vue.component('parent',Parent)
    new Vue({
		el:'#app',
	})
  </script>
</body>
</html>